<%# locals: (url:, is_active:, icon:, name:, html_id: nil, has_permission: true) %>

<% if has_permission %>
  <li>
    <a
      href="<%= url %>"
      <% if html_id %>
        id="<%= html_id %>"
      <% end %>
      class="<%= is_active ? "bg-orange-700 text-white" : "text-orange-100 hover:text-white hover:bg-orange-700" %> group flex gap-x-3 rounded-md p-2 text-sm leading-6 font-semibold"
    >
      <%== part("components/icon", name: icon, classes: "h-6 w-6 shrink-0 text-white") %>
      <%= name %>
    </a>
  </li>
<% end %>
